package com.ruge.core.tool.jpa;

import static javax.persistence.criteria.Predicate.BooleanOperator.AND;
import static javax.persistence.criteria.Predicate.BooleanOperator.OR;

/**
 * @author ruge.wu
 * @since 2021/12/24 16:39
 */
public class QueryWrapper {
    private QueryWrapper() {
    }


    /**
     * 构造查询条件
     *
     * @param <T> 泛型
     * @return 关联查询
     */
    public static <T> PredicateBuilder<T> and() {
        return new PredicateBuilder<>(AND);
    }

    public static <T> PredicateBuilder<T> or() {
        return new PredicateBuilder<>(OR);
    }
}
